package com.hjm.project.team.teamYl.service.impl;

import java.util.List;

import com.hjm.project.team.teamYl.domain.TeamYl;
import com.hjm.project.team.teamYl.mapper.TeamYlMapper;
import com.hjm.project.team.teamYl.service.ITeamYlService;
import com.hjm.project.team.teamYlInfo.mapper.TeamYlInfoMapper;
import org.springframework.stereotype.Service;
import com.hjm.common.utils.text.Convert;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * 团长信息Service业务层处理
 * 
 * @author maker-platform
 * @date 2021-04-10
 */
@Service
public class TeamYlServiceImpl implements ITeamYlService
{
    @Resource
    private TeamYlMapper teamYlMapper;          //团长
    @Resource
    private TeamYlInfoMapper teamYlInfoMapper;  //团员

    /**
     * 查询团长信息
     * 
     * @param teamYlId 团长信息ID
     * @return 团长信息
     */
    @Override
    public TeamYl selectTeamYlById(String teamYlId)
    {
        return teamYlMapper.selectTeamYlById(teamYlId);
    }

    /**
     * 查询团长信息列表
     * 
     * @param teamYl 团长信息
     * @return 团长信息
     */
    @Override
    public List<TeamYl> selectTeamYlList(TeamYl teamYl)
    {
        return teamYlMapper.selectTeamYlList(teamYl);
    }

    /**
     * 新增团长信息
     * 
     * @param teamYl 团长信息
     * @return 结果
     */
    @Override
    @Transactional
    public int insertTeamYl(TeamYl teamYl) {
        return teamYlMapper.insertTeamYl(teamYl);
    }

    /**
     * 修改团长信息
     * 
     * @param teamYl 团长信息
     * @return 结果
     */
    @Override
    public int updateTeamYl(TeamYl teamYl)
    {
        return teamYlMapper.updateTeamYl(teamYl);
    }

    /**
     * 删除团长信息对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteTeamYlByIds(String ids)
    {
        return teamYlMapper.deleteTeamYlByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除团长信息信息
     * 
     * @param teamYlId 团长信息ID
     * @return 结果
     */
    @Override
    public int deleteTeamYlById(String teamYlId)
    {
        return teamYlMapper.deleteTeamYlById(teamYlId);
    }


}
